package com.googlecode.yonggemovie.widgets.imagelist;

import java.util.List;

import javax.swing.JList;


public class ImageList extends JList {
	private ImageListData[] imageDatas;

	public ImageList(ImageListData[] imageDatas) {
		this.imageDatas = imageDatas;
		init();
	}

	public ImageList(List<ImageListData> imageDatas) {
		this.imageDatas = imageDatas.toArray(new ImageListData[imageDatas.size()]);
		init();
	}
	
	private void init() {

		setCellRenderer(new ImageListCellRenderer());
		setListData(imageDatas);
	}
	
	
	
	
	
	
	
	
	
}